<template>
	<view>
		<detailPage
			:pageUrl="pageUrl"
			:editFormOptions="editFormOptions"
			:editFormFields="editFormFields"
			:detailColumns="detailColumns"
			@masterDate="masterDate"
			:titel="titel"
		></detailPage>
	</view>
</template>
<script>
export default {
	data() {
		return {
			titel: '',
			pageUrl: 'q_warehouse_location',
			editFormFields: {
				WHSE_no: '',
				WHSE_name: '',
				Item_num: ''
			},
			editFormOptions: [
				{
					title: 'ID',
					required: true,
					field: 'Location_id',
					hidden: true,
					readonly: true
				},
				{
					title: '库位编码',
					field: 'WHSE_no',
					readonly: true
				},
				{
					title: '库位名称',
					field: 'WHSE_name',
					readonly: true
				},
				{
					title: '商品数量',
					field: 'Item_num',
					readonly: true,
					type: 'number'
				}
			],
			detailColumns: [
				{
					field: 'Location_list_id',
					title: 'ID',
					hidden: true
				},
				{
					field: 'WHSE_no',
					title: '仓库编码',
					readonly: true
				},
				{
					field: 'WHSE_name',
					title: '仓库名称',
					readonly: true
				},
				{
					field: 'Item_sub',
					title: '商品编号',
					type: 'string',
					readonly: true
				},
				{
					field: 'Item_name',
					title: '商品名称',
					type: 'string',
					readonly: true
				},
				{
					field: 'Inventory_min',
					title: '最小库存',
					readonly: true
				},
				{
					field: 'Inventory_max',
					title: '最大库存',
					readonly: true
				},
				{
					field: 'Remark',
					title: '备注',
					readonly: true
				}
			]
		};
	},
	methods: {
		masterDate(val) {
			Object.assign(this.editFormFields, val);
		}
	}
};
</script>
